package y2020.m03.d22;

public class TwoThreadGetName {

    public static void main(String[] args) throws InterruptedException {

        Thread thread = Thread.currentThread();
        System.out.println(thread.getId() + thread.getName());

        new Thread(() -> {
            Thread thread1 = Thread.currentThread();
            System.out.println(thread1.getId() + thread1.getName());
        }).start();


        new Thread(() -> {
            Thread thread1 = Thread.currentThread();
            System.out.println(thread1.getId() + thread1.getName());
        }).start();

        System.out.println("activeCount:" + Thread.activeCount());
    }
}
